home *** CD-ROM | disk | FTP | other *** search
/ 64'er Special 40 / 64er_Magazin_Sonderheft_40_19xx_Markt__Technik_de.d64 / demo 2 (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  454b  |  15 lines

  1. 100 rem lottosimulation
  2. 110 dim zahl%(49)
  3. 120 fora=1to6:rem lottozahlen ermitteln
  4. 130 zufall=int(rnd(1)*49)+1:ifzahl%(zufall)=1then130
  5. 140 zahl%(zufall)=1:next
  6. 150 print"[147]bitte geben sie ihre zahlen ein"
  7. 160 fora=1to6:rem tippvorschlaege eingeben
  8. 170 input"  ][157][157]";ein(a):ifein(a)<1orein(a)>49thenprint"ungueltig":goto170
  9. 180 next
  10. 190 print:print"die aktuellen lottozahlen sind"
  11. 200 fora=1to49:ifzahl%(a)=1thenprinta;
  12. 210 next
  13. 220 fora=1to6:ifzahl%(ein(a))=1thenzaeler=zaeler+1
  14. 230 next:print:print:print"sie hatten";zaeler;"zahl(en) richtig"
  15.